<!DOCTYPE html>

<html class="no-js css-menubar" lang="zh-cn">

	<head>
		<title>菜单列表</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<!-- 移动设备 viewport -->
		<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui">

		<!-- 样式 -->
		<link rel="stylesheet" href="../public/themes/classic/global/css/bootstrap.css">
		<link rel="stylesheet" href="../public/fonts/font-awesome/font-awesome.css">
		<link rel="stylesheet" href="../public/fonts/web-icons/web-icons.css">
		<link rel="stylesheet" href="../public/themes/classic/base/css/site.css" id="admui-siteStyle">
		
		<link rel="stylesheet" href="../public/vendor/jquery-treegrid/jquery-treegrid.css" />

		<script src="../public/vendor/jquery/jquery.min.js"></script>
		<script src="../public/vendor/bootstrap/bootstrap.min.js"></script>
		<script src="../public/vendor/artTemplate/template.min.js"></script>
		<!--layer弹窗-->
		<script src="../public/vendor/layer/layer.js"></script>
		<script src="../js/common.js"></script>
		<script src="../public/vendor/vue/vue.min.js"></script>
		<style>
			
		</style>
	</head>

	<body class="layout-full">
		<div class="page animation-fade page-blank" id="app">
			<div class="page-content">
				<div class="panel">
					<div class="panel-heading">
						<h3 class="panel-title">菜单列表</h3>
						<div class="page-header-actions">
								<button type="button" v-if="hasPermission('system/menu/save.htm')" class="btn btn-icon btn-primary btn-sm" onclick="layer_show('添加菜单', 'menu-edit.html', '660', '480', false)">
									<i class="fa fa-plus" aria-hidden="true"></i> 添加
								</button>
								<button type="button" v-if="hasPermission('system/menu/update.htm')" class="btn btn-icon btn-primary btn-sm" onclick="layer_show('编辑菜单', 'menu-edit.html', '660', '480', true)">
										<i class="fa fa-pencil" aria-hidden="true"></i> 编辑
								</button>
								<button type="button" v-if="hasPermission('system/menu/delete.htm')" class="btn btn-icon btn-primary btn-sm" onclick="layer_del()">
										<i class="fa fa-close" aria-hidden="true"></i> 删除
								</button>
							</div>
					</div>
					<div class="panel-body">
						<table class="table table-bordered table-striped table-condensed" data-plugin="treegrid" id="menuTable">
                                    <thead class="treegrid-thead">
			                            <tr>
			                                <th></th>
			                                <th width="80">菜单ID</th>
			                                <th>菜单名称</th>
			                                <th>上级菜单</th>
			                                <th class="text-center">图标</th>
			                                <th class="text-center">类型</th>
			                                <th class="text-center">排序号</th>
			                                <th>菜单URL</th>
			                            </tr>
			                        </thead>
			                        <tbody>
			                        <!-- 加载菜单 up -->
	                                <script type="text/html" id="menus">
                                	{{each menus as item i}}
										<tr class="treegrid-{{item.id}} treegrid-expanded">
											<td class="text-center" width="50">
												<div class="radio-custom radio-primary">
												<input id="inputRadioPrimary" name="id" value="{{item.id}}" type="radio">
												<label></label>
												</div>
											</td>
											<td class="text-center">{{item.id}}</td>
											<td> {{item.name}}</td>
											<td>{{item.parentName}}</td>
											<td class="text-center"><i class="{{item.icon}}"></i></td>
											<td class="text-center"><span class="label label-primary">目录</span></td>
											<td class="text-center">{{item.orderNum}}</td>
											<td>{{item.url}}</td>
										</tr>
										{{include 'parentMenuSub' item}}
									{{/each}}
									</script> 
									<script id="parentMenuSub" type="text/html">
    								{{each parentMenuSub as item i}}
										<tr class="treegrid-{{item.id}} treegrid-parent-{{item.parentId}} treegrid-expanded">
											<td class="text-center" width="50">
												<div class="radio-custom radio-primary">
												<input id="inputRadioPrimary" name="id" value="{{item.id}}" type="radio">
												<label></label>
												</div>
											</td>
											<td class="text-center">{{item.id}}</td>
											<td> {{item.name}}</td>
											<td>{{item.parentName}}</td>
											<td class="text-center"><i class="{{item.icon}}"></i></td>
											<td class="text-center"><span class="label label-info">菜单</span></td>
											<td class="text-center">{{item.orderNum}}</td>
											<td>{{item.url}}</td>
										</tr>
										{{include 'sonMenuSub' item}}
									{{/each}}
									</script>
									<script id="sonMenuSub" type="text/html">
    								{{each sonMenuSub as item i}}
										<tr class="treegrid-{{item.id}} treegrid-parent-{{item.parentId}}">
											<td class="text-center" width="50">
												<div class="radio-custom radio-primary">
												<input id="inputRadioPrimary" name="id" value="{{item.id}}" type="radio">
												<label></label>
												</div>
											</td>
											<td class="text-center">{{item.id}}</td>
											<td>{{item.name}}</td>
											<td>{{item.parentName}}</td>
											<td class="text-center"><i class="{{item.icon}}"></i></td>
											<td class="text-center"><span class="label label-warning">按钮</span></td>
											<td class="text-center">{{item.orderNum}}</td>
											<td>{{item.url}}</td>
										</tr>
									{{/each}}
									</script>
			                        
                                   </tbody> 
                                </table>

					</div>
				</div>
			</div>
		</div>

	<script src="../public/vendor/jquery-treegrid/jquery.treegrid.min.js" data-name="treegrid"></script>
	<script src="../public/themes/classic/base/js/app.js"></script>
	<script src="../js/system/menu.js"></script>
	<script>
			

	</script>
	</body>

</html>